summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2009-09-05 14:22:49 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2009-09-05 14:22:49 +0800
commit5ef482ae4347e3337509c0b37107586d0b406d0a (patch)
treeb2251aa74bc563a79ecb5f5d0522dc5d9d55e2b8
parent6740dc8799c43d006876d8f0c29c3a51c1c2a4e8 (diff)
ppswrapper: fixed replying catgory list
-rw-r--r--wrapper/ppswrapper-server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/wrapper/ppswrapper-server.c b/wrapper/ppswrapper-server.c
index f3a3c88..444ead4 100644
--- a/wrapper/ppswrapper-server.c
+++ b/wrapper/ppswrapper-server.c
@@ -443,15 +443,13 @@ send_cat_reply(ppsw_server_t* self,
size_t len;
if (catnum && cat)
- len = 2 + 4 + ppsw_cal_category_size(cat, catnum);
+ len = 4 + ppsw_cal_category_size(cat, catnum);
else
- len = 2 + 4;
+ len = 4;
if (ppsw_packet_init(&p, PPSW_REPLY_GET_CAT, len) < 0)
return -1;
- if (ppsw_packet_writes(&p, id) < 0)
- return -1;
if (ppsw_packet_writel(&p, catnum) < 0)
return -1;
if (cat && catnum && ppsw_write_categories(&p, cat, catnum) < 0)
@@ -941,6 +939,8 @@ process_vod_list_get_cat(ppsw_server_t* self,
ppscategory* cat;
cat = pps_vodlist_getcat(&catnum);
+ if (!cat)
+ perror ("Couldn't get category list");
return send_cat_reply (self, msg->seq, cat, catnum);
}