Unexpected topic message is set by fgets operation.
Change-Id: I4a7ac3d1a91baa0025426967fb54a13d3f58156d
Signed-off-by: cc <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11341
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
printf("id : %d\n", ++id);
printf("title : ");
- fgets(title, sizeof(title), stdin);
+ gets(title);
printf("body : ");
- fgets(body, sizeof(body), stdin);
+ gets(body);
printf("topic : ");
- fgets(topic, sizeof(topic), stdin);
+ gets(topic);
printf("app - mTitle : %s \n", title);
printf("app - mContentText : %s \n", body);