Changeset 226 for trunk/src


Ignore:
Timestamp:
Apr 18, 2009, 5:55:37 PM (16 years ago)
Author:
katerina
Message:

Fix for ticket #151 (incorrect hostname insertion into db when relaying).

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_database.c

    r207 r226  
    17661766/* recursively enter linked list of messages into database, last first
    17671767 */
    1768 long sh_database_insert_rec (dbins * curr, int depth)
     1768long sh_database_insert_rec (dbins * curr, int depth, char * host)
    17691769{
    17701770  unsigned long    id = 0;
    1771   dbins * prev;
    17721771
    17731772  SL_ENTER(_("sh_database_insert_rec"));
     
    17751774  if (curr->next)
    17761775    {
     1776      /*
    17771777      prev = curr->next;
    17781778      sl_strlcpy(prev->host, curr->host, 64);
    17791779      id = sh_database_insert_rec (curr->next, (depth + 1));
    1780     }
     1780      */
     1781      ++depth;
     1782      id = sh_database_insert_rec (curr->next, depth, curr->host);
     1783    }
     1784
     1785  if (host)
     1786    sl_strlcpy(curr->host, host, 64);
    17811787
    17821788  if (id != 0)                       /* this is a server wrapper          */
     
    18181824  /* recursively enter the linked list into the database
    18191825   */
    1820   (void) sh_database_insert_rec (db_entry, 0);
     1826  (void) sh_database_insert_rec (db_entry, 0, NULL);
    18211827
    18221828  SL_RETURN(0, _("sh_database_insert"));
  • trunk/src/sh_utils.c

    r214 r226  
    21072107
    21082108 
    2109 size_t sh_util_base64_enc (unsigned char * out, const unsigned char * instr,
     2109size_t sh_util_base64_enc (unsigned char * out,
     2110                           const unsigned char * instr,
    21102111                           size_t lin)
    21112112{
     
    21712172}
    21722173
    2173 size_t sh_util_base64_dec (unsigned char *out, const unsigned char *in,
     2174size_t sh_util_base64_dec (unsigned char *out,
     2175                           const unsigned char *in,
    21742176                           size_t lin)
    21752177{
Note: See TracChangeset for help on using the changeset viewer.