Mercurial > audlegacy
comparison src/libaudacious/beepctrl.c @ 2361:f24ae4f40e29 trunk
[svn] - security and warning fixes from ssommer@suse
author | nenolod |
---|---|
date | Thu, 18 Jan 2007 03:02:55 -0800 |
parents | 3149d4b1a9a9 |
children | 5fea66ad690c |
comparison
equal
deleted
inserted
replaced
2360:d2d296826b06 | 2361:f24ae4f40e29 |
---|---|
104 | 104 |
105 pkt_hdr.version = XMMS_PROTOCOL_VERSION; | 105 pkt_hdr.version = XMMS_PROTOCOL_VERSION; |
106 pkt_hdr.command = command; | 106 pkt_hdr.command = command; |
107 pkt_hdr.data_length = data_length; | 107 pkt_hdr.data_length = data_length; |
108 if ((size_t)write(fd, &pkt_hdr, sizeof(ClientPktHeader)) < sizeof(pkt_hdr)) | 108 if ((size_t)write(fd, &pkt_hdr, sizeof(ClientPktHeader)) < sizeof(pkt_hdr)) |
109 { | |
110 g_warning("remote_send_packet: failed to write packet header"); | |
109 return; | 111 return; |
112 } | |
110 if (data_length && data) | 113 if (data_length && data) |
111 write(fd, data, data_length); | 114 if( data_length != write(fd, data, data_length)) |
115 { | |
116 g_warning("remote_send_packet: failed to write packet"); | |
117 return; | |
118 } | |
112 } | 119 } |
113 | 120 |
114 static void | 121 static void |
115 remote_send_guint32(gint session, guint32 cmd, guint32 val) | 122 remote_send_guint32(gint session, guint32 cmd, guint32 val) |
116 { | 123 { |