Diff of /daemons/lircd.c [02c5c3] .. [9592bb] Maximize Restore

  Switch to unified view

a/daemons/lircd.c b/daemons/lircd.c
...
...
1312
    if (!(write_socket_len(fd, protocol_string[P_DATA]) && write_socket_len(fd, buffer)))
1312
    if (!(write_socket_len(fd, protocol_string[P_DATA]) && write_socket_len(fd, buffer)))
1313
        return (0);
1313
        return (0);
1314
1314
1315
    codes = remote->codes;
1315
    codes = remote->codes;
1316
    while (codes->name != NULL) {
1316
    while (codes->name != NULL) {
1317
        len = snprintf(buffer, PACKET_SIZE, "%016llx %s\n", codes->code, codes->name);
1317
        len = snprintf(buffer, PACKET_SIZE, "%016llx %s\n", (unsigned long long)codes->code, codes->name);
1318
        if (len >= PACKET_SIZE + 1) {
1318
        if (len >= PACKET_SIZE + 1) {
1319
            len = sprintf(buffer, "code_too_long\n");
1319
            len = sprintf(buffer, "code_too_long\n");
1320
        }
1320
        }
1321
        if (write_socket(fd, buffer, len) < len)
1321
        if (write_socket(fd, buffer, len) < len)
1322
            return (0);
1322
            return (0);
...
...
1332
1332
1333
    if (!
1333
    if (!
1334
        (write_socket_len(fd, protocol_string[P_BEGIN]) && write_socket_len(fd, message)
1334
        (write_socket_len(fd, protocol_string[P_BEGIN]) && write_socket_len(fd, message)
1335
         && write_socket_len(fd, protocol_string[P_SUCCESS]) && write_socket_len(fd, protocol_string[P_DATA])))
1335
         && write_socket_len(fd, protocol_string[P_SUCCESS]) && write_socket_len(fd, protocol_string[P_DATA])))
1336
        return (0);
1336
        return (0);
1337
    len = snprintf(buffer, PACKET_SIZE, "1\n%016llx %s\n", code->code, code->name);
1337
    len = snprintf(buffer, PACKET_SIZE, "1\n%016llx %s\n", (unsigned long long)code->code, code->name);
1338
    if (len >= PACKET_SIZE + 1) {
1338
    if (len >= PACKET_SIZE + 1) {
1339
        len = sprintf(buffer, "1\ncode_too_long\n");
1339
        len = sprintf(buffer, "1\ncode_too_long\n");
1340
    }
1340
    }
1341
    if (write_socket(fd, buffer, len) < len)
1341
    if (write_socket(fd, buffer, len) < len)
1342
        return (0);
1342
        return (0);