/[ipchat]/ipchat/src/protocol.c
ViewVC logotype

Diff of /ipchat/src/protocol.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by beatk, Sat Nov 6 18:46:39 2004 UTC revision 1.7 by beatk, Sun Feb 27 21:20:36 2005 UTC
# Line 26  Line 26 
26  #include "user_iface.h"  #include "user_iface.h"
27  #include "demux.h"  #include "demux.h"
28  #include "misc.h"  #include "misc.h"
29    #include "log.h"
30    
31  /* Header of sent and received messages. */  /* Header of sent and received messages. */
32  /* ATTENTION: Changing this struct requires revision of hton_header(),  /* ATTENTION: Changing this struct requires revision of hton_header(),
# Line 78  static int header_size (uint16_t msg_typ Line 79  static int header_size (uint16_t msg_typ
79  void  void
80  pr_send_text (contact_t *contact, const char *txt)  pr_send_text (contact_t *contact, const char *txt)
81  {  {
82            size_t len = strlen (txt);
83    
84          header.type = MSG_TEXT;          header.type = MSG_TEXT;
85          hton_header ();          hton_header ();
86          tr_send_msg (contact, (BYTE *)&header, HEADER_SIZE(text),          tr_send_msg (contact, (BYTE *)&header, HEADER_SIZE(text),
87                       (BYTE *)txt, strlen (txt));                       (BYTE *)txt, len);
88    
89            if (cfg.logging) {
90                    lg_log_text (cfg.nick, contact, txt, len);
91            }
92  }  }
93    
94  void  void
# Line 253  received_text (contact_t *contact, const Line 260  received_text (contact_t *contact, const
260    
261          ui_output_msg (contact, text, len);          ui_output_msg (contact, text, len);
262    
263            if (cfg.logging) {
264                    lg_log_text (contact->nick, contact, text, len);
265            }
266    
267          return OK;          return OK;
268  }  }
269    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26