diff options
author | Holger Steinhaus <hsteinhaus@gmx.de> | 2015-11-11 21:11:35 +0100 |
---|---|---|
committer | Holger Steinhaus <hsteinhaus@gmx.de> | 2015-11-17 12:51:28 +0100 |
commit | e4ed62f8a9a3bf45932bce845d4c1f888bed121c (patch) | |
tree | 483f0669f2bc294584364f71cfaf36b7149b009f /mcast | |
parent | b56628077d0c54c08dddff6ee80aba4e661dc9f4 (diff) | |
download | vdr-plugin-mcli-e4ed62f8a9a3bf45932bce845d4c1f888bed121c.tar.gz vdr-plugin-mcli-e4ed62f8a9a3bf45932bce845d4c1f888bed121c.tar.bz2 |
removed some printfs, converted others to VDR-like isyslog/dsyslog/esyslog() calls
Diffstat (limited to 'mcast')
-rw-r--r-- | mcast/client/mmi_handler.c | 2 | ||||
-rw-r--r-- | mcast/common/ciparser.c | 8 | ||||
-rw-r--r-- | mcast/common/mld_client.c | 5 | ||||
-rw-r--r-- | mcast/common/recv_ccpp.c | 5 |
4 files changed, 9 insertions, 11 deletions
diff --git a/mcast/client/mmi_handler.c b/mcast/client/mmi_handler.c index 716c7f1..3787892 100644 --- a/mcast/client/mmi_handler.c +++ b/mcast/client/mmi_handler.c @@ -219,6 +219,8 @@ int mmi_get_data (xmlChar * xmlbuff, int buffersize, mmi_info_t * mmi_info) xmlKeepBlanksDefault (0); //reomve this f. "text" nodes c.doc = xmlParseMemory ((char *) xmlbuff, buffersize); + c.str = NULL; + c.key = NULL; root_element = xmlDocGetRootElement (c.doc); pthread_cleanup_push (clean_xml_parser_thread, &c); diff --git a/mcast/common/ciparser.c b/mcast/common/ciparser.c index 5ce563d..bacde43 100644 --- a/mcast/common/ciparser.c +++ b/mcast/common/ciparser.c @@ -23,10 +23,10 @@ static unsigned char lc[] = { 0x01, 0x02, 0xA0, 0x5F, 0x02, 0x90, 0x02, 0x00, 0x static unsigned char ld[] = { 0x00, 0x01, 0xA0, 0x82, 0x00, 0x10, 0x01, 0x90, 0x02, 0x00, 0x03, 0x9F, 0x80, 0x33, 0x07, 0x2D, 0xB9, 0x01, 0x81, 0x00, 0x08, 0x00, 0x80, 0x02, 0x01, 0x00 }; static unsigned char le[] = { 0x00, 0x01, 0xA0, 0x34, 0x01, 0x90, 0x02, 0x00, 0x03, 0x9F, 0x80, 0x32, 0x2B, 0x03, 0x00, 0x0B, 0x01, 0x00, 0x11, 0x01, 0x09, 0x06, 0x17, 0x22, 0xF0, 0x0B, 0x00, 0x0B, 0x09, 0x06, 0x17, 0x02, 0xF0, 0x0B, 0x00, 0x0B, 0x02, 0x06, 0xFF, 0x00, 0x00, 0x04, 0x07, 0x00, 0x00, 0x00, 0x04, 0x07, 0x01, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00}; -#define dbg(format, arg...) printf("%s:%d " format , __FILE__ , __LINE__ , ## arg) -#define err(format, arg...) {printf("err:%s:%d: %s (%d): " format , __FILE__ , __LINE__ ,strerror(errno), errno, ## arg);print_trace();abort();} -#define info(format, arg...) printf("%s:%d: " format , __FILE__ , __LINE__ ,## arg) -#define warn(format, arg...) printf("%s:%d: " format , __FILE__ , __LINE__ ,## arg) +#define dbg(format, arg...) dsyslog("%s:%d " format , __FILE__ , __LINE__ , ## arg) +#define err(format, arg...) {esyslog("err:%s:%d: %s (%d): " format , __FILE__ , __LINE__ ,strerror(errno), errno, ## arg);print_trace();abort();} +#define info(format, arg...) isyslog("%s:%d: " format , __FILE__ , __LINE__ ,## arg) +#define warn(format, arg...) isyslog("%s:%d: " format , __FILE__ , __LINE__ ,## arg) #define STATIC #else //#define DEBUG diff --git a/mcast/common/mld_client.c b/mcast/common/mld_client.c index d291466..7369174 100644 --- a/mcast/common/mld_client.c +++ b/mcast/common/mld_client.c @@ -31,9 +31,6 @@ int send_mldv2_report (struct intnode *intn, int grec_number, struct in6_addr *m int mca_index, src_index; int count = 0; - bool any = false; - - //printf("creating multicast listener report packet....\n"); //printf("size src = %d size grec = %d \n",sizeof(*src),sizeof(*grec)); if (intn->mtu < sizeof (*packet)) { @@ -156,8 +153,6 @@ int send_mldv2_report (struct intnode *intn, int grec_number, struct in6_addr *m } /* Nothing added yet */ - any = false; - for (src_index = 0; src_index < srcn || (!srcn && src_index == 0); src_index++) { //check for duplicate source reocrds and any address diff --git a/mcast/common/recv_ccpp.c b/mcast/common/recv_ccpp.c index ce15e4c..bc02917 100644 --- a/mcast/common/recv_ccpp.c +++ b/mcast/common/recv_ccpp.c @@ -469,8 +469,8 @@ void *recv_ten (void *arg) clock_t lastrecv=0; int donetimeout=0; - pthread_cleanup_push (clean_ccpp_thread, &c); memset (&c, 0, sizeof (ccpp_thread_context_t)); + pthread_cleanup_push (clean_ccpp_thread, &c); c.buf=(xmlChar *)malloc(XML_BUFLEN); if (!c.buf) { @@ -599,8 +599,8 @@ void *recv_tra (void *arg) unsigned int dstlen; struct in6_addr tra; - pthread_cleanup_push (clean_ccpp_thread, &c); memset (&c, 0, sizeof (ccpp_thread_context_t)); + pthread_cleanup_push (clean_ccpp_thread, &c); c.buf=(xmlChar *)malloc(XML_BUFLEN); if (!c.buf) { @@ -1278,6 +1278,7 @@ void *recv_tca (void *arg) netceiver_info_t nc_info; struct in6_addr tca; + memset (&c, 0, sizeof (ccpp_thread_context_t)); pthread_cleanup_push (clean_ccpp_thread, &c); c.buf=(xmlChar *)malloc(XML_BUFLEN); |