fixed whois demo to be compatible with address_cache ability which parses the text of the whois output.

This commit is contained in:
skarg
2012-09-27 19:25:24 +00:00
parent 5aa78916ae
commit d09657474c
2 changed files with 25 additions and 32 deletions
+2 -2
View File
@@ -202,7 +202,7 @@ static void address_file_init(
FILE *pFile = NULL; /* stream pointer */
char line[256] = { "" }; /* holds line from file */
long device_id = 0;
int snet = 0;
unsigned snet = 0;
unsigned max_apdu = 0;
unsigned mac[MAX_MAC_LEN] = { 0 };
int count = 0;
@@ -216,7 +216,7 @@ static void address_file_init(
while (fgets(line, (int) sizeof(line), pFile) != NULL) {
/* ignore comments */
if (line[0] != ';') {
if (sscanf(line, "%7ld %79s %5d %79s %4u", &device_id,
if (sscanf(line, "%7ld %79s %5u %79s %4u", &device_id,
&mac_string[0], &snet, &sadr_string[0],
&max_apdu) == 5) {
count =