kopia lustrzana https://github.com/Hamlib/Hamlib
astyle files
rodzic
4177dde4e0
commit
5e801fd2b5
|
@ -410,12 +410,14 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
|
||||
if (vfo == RIG_VFO_A) { priv->curr->freq = freq; }
|
||||
else if (vfo == RIG_VFO_B) { priv->curr->tx_freq = freq; }
|
||||
|
||||
if (!priv->split)
|
||||
{
|
||||
priv->curr->tx_freq = freq;
|
||||
}
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: curr->freq=%.0f, curr->tx_freq=%.0f\n", __func__,
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: curr->freq=%.0f, curr->tx_freq=%.0f\n",
|
||||
__func__,
|
||||
priv->curr->freq, priv->curr->tx_freq);
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -376,7 +376,7 @@ static char *xml_parse(char *xml, char *value, int value_len)
|
|||
xml_parse2(next, value, value_len);
|
||||
}
|
||||
|
||||
if ( value && strstr(value, "faultString"))
|
||||
if (value && strstr(value, "faultString"))
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s error:\n%s\n", __func__, value);
|
||||
value[0] = 0; /* truncate to give empty response */
|
||||
|
|
|
@ -1575,7 +1575,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
|
|||
|
||||
switch (mode)
|
||||
{
|
||||
case RIG_MODE_PKTUSB:
|
||||
case RIG_MODE_PKTUSB:
|
||||
// xFE xFE x6E xE0 x1A x06 x01 xFD switchs mod input from MIC to ACC
|
||||
// This apparently works for IC-756ProIII but nobody has asked for it yet
|
||||
icom_mode = RIG_MODE_USB;
|
||||
|
|
|
@ -327,7 +327,8 @@ transaction_write:
|
|||
// Seems some rigs (like TS-480) return "?" when RX is done while PTT=OFF
|
||||
// So we'll skip the checks just on this one command for now
|
||||
// The TS-480 PC Control says RX; should return RX0; but it doesn't
|
||||
if (retval == RIG_OK && strncmp(cmdstr, "RX", 2) == 0) goto transaction_quit;
|
||||
// We may eventually want to verify PTT with rig_get_ptt instead
|
||||
if (retval == RIG_OK && strncmp(cmdstr, "RX", 2) == 0) { goto transaction_quit; }
|
||||
|
||||
if (!datasize)
|
||||
{
|
||||
|
@ -668,18 +669,20 @@ int kenwood_init(RIG *rig)
|
|||
priv = rig->state.priv;
|
||||
|
||||
memset(priv, 0x00, sizeof(struct kenwood_priv_data));
|
||||
|
||||
if (RIG_IS_XG3)
|
||||
{
|
||||
priv->verify_cmd[0] = caps->cmdtrm;
|
||||
priv->verify_cmd[1] ='\0';
|
||||
priv->verify_cmd[1] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->verify_cmd[0] ='I';
|
||||
priv->verify_cmd[1] ='D';
|
||||
priv->verify_cmd[0] = 'I';
|
||||
priv->verify_cmd[1] = 'D';
|
||||
priv->verify_cmd[2] = caps->cmdtrm;
|
||||
priv->verify_cmd[3] ='\0';
|
||||
priv->verify_cmd[3] = '\0';
|
||||
}
|
||||
|
||||
priv->split = RIG_SPLIT_OFF;
|
||||
priv->trn_state = -1;
|
||||
priv->curr_mode = 0;
|
||||
|
@ -731,7 +734,8 @@ int kenwood_open(RIG *rig)
|
|||
rig_debug(RIG_DEBUG_TRACE, "%s: got ID so try PS\n", __func__);
|
||||
err = rig_get_powerstat(rig, &powerstat);
|
||||
|
||||
if (err == RIG_OK && powerstat == 0 && priv->poweron == 0 && rig->state.auto_power_on)
|
||||
if (err == RIG_OK && powerstat == 0 && priv->poweron == 0
|
||||
&& rig->state.auto_power_on)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: got PS0 so powerup\n", __func__);
|
||||
rig_set_powerstat(rig, 1);
|
||||
|
@ -741,6 +745,7 @@ int kenwood_open(RIG *rig)
|
|||
|
||||
err = RIG_OK; // reset our err back to OK for later checks
|
||||
}
|
||||
|
||||
if (err == -RIG_ETIMEOUT && rig->state.auto_power_on)
|
||||
{
|
||||
// Ensure rig is on
|
||||
|
@ -748,6 +753,7 @@ int kenwood_open(RIG *rig)
|
|||
/* Try get id again */
|
||||
err = kenwood_get_id(rig, id);
|
||||
}
|
||||
|
||||
if (RIG_OK != err)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR,
|
||||
|
@ -879,6 +885,7 @@ int kenwood_open(RIG *rig)
|
|||
vfo_t tx_vfo;
|
||||
/* get current AI state so it can be restored */
|
||||
kenwood_get_trn(rig, &priv->trn_state); /* ignore errors */
|
||||
|
||||
/* Currently we cannot cope with AI mode so turn it off in
|
||||
case last client left it on */
|
||||
if (priv->trn_state != RIG_TRN_OFF)
|
||||
|
@ -891,10 +898,12 @@ int kenwood_open(RIG *rig)
|
|||
{
|
||||
// call get_split to fill in current split and tx_vfo status
|
||||
retval = kenwood_get_split_vfo_if(rig, RIG_VFO_A, &split, &tx_vfo);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: %s\n", __func__, rigerror(retval));
|
||||
}
|
||||
|
||||
priv->tx_vfo = tx_vfo;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->tx_vfo=%s\n", __func__,
|
||||
rig_strvfo(priv->tx_vfo));
|
||||
|
@ -3438,7 +3447,8 @@ int kenwood_set_trn(RIG *rig, int trn)
|
|||
|
||||
case RIG_MODEL_THD7A:
|
||||
case RIG_MODEL_THD74:
|
||||
return kenwood_transaction(rig, (trn == RIG_TRN_RIG) ? "AI 1" : "AI 0", buf, sizeof buf);
|
||||
return kenwood_transaction(rig, (trn == RIG_TRN_RIG) ? "AI 1" : "AI 0", buf,
|
||||
sizeof buf);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -435,12 +435,12 @@ th_set_vfo(RIG *rig, vfo_t vfo)
|
|||
case RIG_VFO_A:
|
||||
case RIG_VFO_VFO:
|
||||
case RIG_VFO_MAIN:
|
||||
strncpy (cmd, "BC 0", sizeof cmd);
|
||||
strncpy(cmd, "BC 0", sizeof cmd);
|
||||
break;
|
||||
|
||||
case RIG_VFO_B:
|
||||
case RIG_VFO_SUB:
|
||||
strncpy (cmd, "BC 1", sizeof cmd);
|
||||
strncpy(cmd, "BC 1", sizeof cmd);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -463,29 +463,31 @@ th_set_vfo(RIG *rig, vfo_t vfo)
|
|||
case RIG_VFO_A:
|
||||
case RIG_VFO_VFO:
|
||||
case RIG_VFO_MAIN:
|
||||
strncpy (cmd, "VMC 0,0", sizeof cmd);
|
||||
strncpy(cmd, "VMC 0,0", sizeof cmd);
|
||||
break;
|
||||
|
||||
case RIG_VFO_B:
|
||||
case RIG_VFO_SUB:
|
||||
strncpy (cmd, "VMC 1,0", sizeof cmd);
|
||||
strncpy(cmd, "VMC 1,0", sizeof cmd);
|
||||
break;
|
||||
|
||||
case RIG_VFO_MEM:
|
||||
strncpy (cmd, "BC", sizeof cmd);
|
||||
retval = kenwood_transaction (rig, cmd, cmd, sizeof cmd);
|
||||
strncpy(cmd, "BC", sizeof cmd);
|
||||
retval = kenwood_transaction(rig, cmd, cmd, sizeof cmd);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
if (rig->caps->rig_model == RIG_MODEL_THF7E ||
|
||||
rig->caps->rig_model == RIG_MODEL_THF6A)
|
||||
{
|
||||
snprintf (cmd, sizeof cmd, "VMC %c,1", cmd[3]);
|
||||
snprintf(cmd, sizeof cmd, "VMC %c,1", cmd[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf (cmd, sizeof cmd, "VMC %c,2", cmd[3]);
|
||||
snprintf(cmd, sizeof cmd, "VMC %c,2", cmd[3]);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -737,7 +739,7 @@ int th_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
|
|||
}
|
||||
|
||||
/* Set VFO mode. To be done for TX vfo also? */
|
||||
snprintf (vfobuf, sizeof vfobuf, "VMC %d,0", vfonum);
|
||||
snprintf(vfobuf, sizeof vfobuf, "VMC %d,0", vfonum);
|
||||
retval = kenwood_transaction(rig, vfobuf, vfobuf, sizeof vfobuf);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
|
@ -745,7 +747,7 @@ int th_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
|
|||
return retval;
|
||||
}
|
||||
|
||||
snprintf (vfobuf, sizeof vfobuf, "BC %d,%d", vfonum, txvfonum);
|
||||
snprintf(vfobuf, sizeof vfobuf, "BC %d,%d", vfonum, txvfonum);
|
||||
retval = kenwood_transaction(rig, vfobuf, NULL, 0);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
|
@ -804,8 +806,8 @@ int
|
|||
th_set_trn(RIG *rig, int trn)
|
||||
{
|
||||
char buf[5];
|
||||
snprintf (buf, sizeof buf, "AI %c", RIG_TRN_RIG == trn ? '1' : '0');
|
||||
return kenwood_transaction (rig, buf, buf, sizeof buf);
|
||||
snprintf(buf, sizeof buf, "AI %c", RIG_TRN_RIG == trn ? '1' : '0');
|
||||
return kenwood_transaction(rig, buf, buf, sizeof buf);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1417,8 +1419,8 @@ th_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
|
|||
}
|
||||
|
||||
i += (i == 0) ? 1 : 2; /* Correct for TH-D7A index anomally */
|
||||
snprintf (tonebuf, sizeof tonebuf, "TN %02d", i);
|
||||
return kenwood_transaction (rig, tonebuf, tonebuf, sizeof tonebuf);
|
||||
snprintf(tonebuf, sizeof tonebuf, "TN %02d", i);
|
||||
return kenwood_transaction(rig, tonebuf, tonebuf, sizeof tonebuf);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1495,8 +1497,8 @@ th_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
|
|||
}
|
||||
|
||||
i += (i == 0) ? 1 : 2; /* Correct for TH-D7A index anomally */
|
||||
snprintf (tonebuf, sizeof tonebuf, "CTN %02d", i);
|
||||
return kenwood_transaction (rig, tonebuf, tonebuf, sizeof tonebuf);
|
||||
snprintf(tonebuf, sizeof tonebuf, "CTN %02d", i);
|
||||
return kenwood_transaction(rig, tonebuf, tonebuf, sizeof tonebuf);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1565,7 +1567,7 @@ th_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
|
|||
|
||||
if (code == 0)
|
||||
{
|
||||
snprintf (codebuf, sizeof codebuf, "DCS 0");
|
||||
snprintf(codebuf, sizeof codebuf, "DCS 0");
|
||||
return kenwood_transaction(rig, codebuf, codebuf, sizeof codebuf);
|
||||
}
|
||||
|
||||
|
@ -1582,14 +1584,16 @@ th_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
|
|||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
snprintf (codebuf, sizeof codebuf, "DCS 1");
|
||||
if ((retval = kenwood_transaction(rig, codebuf, codebuf, sizeof codebuf)) != RIG_OK)
|
||||
snprintf(codebuf, sizeof codebuf, "DCS 1");
|
||||
|
||||
if ((retval = kenwood_transaction(rig, codebuf, codebuf,
|
||||
sizeof codebuf)) != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
snprintf(codebuf, sizeof codebuf, "DCSN %04d", (i + 1) * 10);
|
||||
return kenwood_transaction (rig, codebuf, codebuf, sizeof codebuf);
|
||||
return kenwood_transaction(rig, codebuf, codebuf, sizeof codebuf);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1724,8 +1728,8 @@ th_set_mem(RIG *rig, vfo_t vfo, int ch)
|
|||
return retval;
|
||||
}
|
||||
|
||||
snprintf (membuf, sizeof membuf, "MC %c,%03i", vsel, ch);
|
||||
return kenwood_transaction (rig, membuf, membuf, sizeof membuf);
|
||||
snprintf(membuf, sizeof membuf, "MC %c,%03i", vsel, ch);
|
||||
return kenwood_transaction(rig, membuf, membuf, sizeof membuf);
|
||||
}
|
||||
|
||||
/* Get mem works only when the display is
|
||||
|
@ -1801,7 +1805,8 @@ th_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
|
|||
{
|
||||
char buf[3];
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: called\n", __func__);
|
||||
return kenwood_transaction(rig, (ptt == RIG_PTT_ON) ? "TX" : "RX", buf, sizeof buf);
|
||||
return kenwood_transaction(rig, (ptt == RIG_PTT_ON) ? "TX" : "RX", buf,
|
||||
sizeof buf);
|
||||
}
|
||||
|
||||
int th_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
|
||||
|
@ -2497,15 +2502,15 @@ int th_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
|
|||
switch (ant)
|
||||
{
|
||||
case RIG_ANT_1:
|
||||
strncpy (cmd, "ANT 0", sizeof cmd);
|
||||
strncpy(cmd, "ANT 0", sizeof cmd);
|
||||
break;
|
||||
|
||||
case RIG_ANT_2:
|
||||
strncpy (cmd, "ANT 1", sizeof cmd);
|
||||
strncpy(cmd, "ANT 1", sizeof cmd);
|
||||
break;
|
||||
|
||||
case RIG_ANT_3:
|
||||
strncpy (cmd, "ANT 2", sizeof cmd);
|
||||
strncpy(cmd, "ANT 2", sizeof cmd);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -850,52 +850,72 @@ int ft1000mp_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
{
|
||||
case RIG_MODE_AM:
|
||||
cmd_index = FT1000MP_NATIVE_MODE_SET_AM;
|
||||
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_AM_B;
|
||||
|
||||
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_AM_B; }
|
||||
|
||||
break;
|
||||
|
||||
case RIG_MODE_CW:
|
||||
cmd_index = FT1000MP_NATIVE_MODE_SET_CWR;
|
||||
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_CWR_B;
|
||||
|
||||
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_CWR_B; }
|
||||
|
||||
break;
|
||||
|
||||
case RIG_MODE_CWR:
|
||||
cmd_index = FT1000MP_NATIVE_MODE_SET_CW;
|
||||
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_CW_B;
|
||||
|
||||
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_CW_B; }
|
||||
|
||||
break;
|
||||
|
||||
case RIG_MODE_USB:
|
||||
cmd_index = FT1000MP_NATIVE_MODE_SET_USB;
|
||||
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_USB_B;
|
||||
|
||||
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_USB_B; }
|
||||
|
||||
break;
|
||||
|
||||
case RIG_MODE_LSB:
|
||||
cmd_index = FT1000MP_NATIVE_MODE_SET_LSB;
|
||||
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_LSB_B;
|
||||
|
||||
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_LSB_B; }
|
||||
|
||||
break;
|
||||
|
||||
case RIG_MODE_FM:
|
||||
cmd_index = FT1000MP_NATIVE_MODE_SET_FM;
|
||||
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_FM_B;
|
||||
|
||||
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_FM_B; }
|
||||
|
||||
break;
|
||||
|
||||
case RIG_MODE_RTTY:
|
||||
cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_LSB;
|
||||
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_LSB_B;
|
||||
|
||||
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_LSB_B; }
|
||||
|
||||
break;
|
||||
|
||||
case RIG_MODE_RTTYR:
|
||||
cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_USB;
|
||||
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_USB_B;
|
||||
|
||||
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_USB_B; }
|
||||
|
||||
break;
|
||||
|
||||
case RIG_MODE_PKTLSB:
|
||||
cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_LSB;
|
||||
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_LSB_B;
|
||||
|
||||
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_LSB_B; }
|
||||
|
||||
break;
|
||||
|
||||
case RIG_MODE_PKTFM:
|
||||
cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_FM;
|
||||
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_FM_B;
|
||||
|
||||
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_FM_B; }
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1558,14 +1578,14 @@ int ft1000mp_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
|
|||
return -RIG_EINVAL; /* sorry, wrong VFO */
|
||||
}
|
||||
|
||||
rig_get_freq(rig,RIG_VFO_B,&tx_freq);
|
||||
rig_get_freq(rig, RIG_VFO_B, &tx_freq);
|
||||
// manual says VFO_A=Tx and VFO_B=Rx but testing shows otherwise
|
||||
rig->state.current_vfo = RIG_VFO_A;
|
||||
rig->state.tx_vfo = RIG_VFO_B;
|
||||
ft1000mp_send_priv_cmd(rig, FT1000MP_NATIVE_AB); // Copy A to B
|
||||
ft1000mp_send_priv_cmd(rig, FT1000MP_NATIVE_VFO_A); // make A active
|
||||
ft1000mp_send_priv_cmd(rig, cmd_index);
|
||||
rig_set_freq(rig,RIG_VFO_B,tx_freq); // restore orig frequency
|
||||
rig_set_freq(rig, RIG_VFO_B, tx_freq); // restore orig frequency
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -227,8 +227,10 @@ gs232b_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
|
|||
*/
|
||||
// There's a 12PR1A rotor that only returns AZ so we may only get AZ=xxx
|
||||
if (sscanf(posbuf, "AZ=%d EL=%d", &int_az, &int_el) == 0)
|
||||
{ // only give error if we didn't parse anything
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s', expected AZ=xxx EL=xxx\n", __func__,
|
||||
{
|
||||
// only give error if we didn't parse anything
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s', expected AZ=xxx EL=xxx\n",
|
||||
__func__,
|
||||
posbuf);
|
||||
return -RIG_EPROTO;
|
||||
}
|
||||
|
|
|
@ -567,6 +567,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val)
|
|||
{
|
||||
return -RIG_EINVAL; //value format error
|
||||
}
|
||||
|
||||
rs->auto_power_on = val_i ? 1 : 0;
|
||||
break;
|
||||
|
||||
|
@ -575,6 +576,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val)
|
|||
{
|
||||
return -RIG_EINVAL; //value format error
|
||||
}
|
||||
|
||||
rs->auto_disable_screensaver = val_i ? 1 : 0;
|
||||
break;
|
||||
|
||||
|
|
|
@ -1313,7 +1313,8 @@ int HAMLIB_API rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection)
|
|||
return rig->state.cache.timeout_ms;
|
||||
}
|
||||
|
||||
int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms)
|
||||
int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection,
|
||||
int ms)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: called selection=%d, ms=%d\n", __func__,
|
||||
selection, ms);
|
||||
|
@ -1393,7 +1394,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
|
|||
if (strncasecmp(hoststr, "com", 3) == 0) { return -1; }
|
||||
|
||||
// escaped COM port like \\.\COM3
|
||||
if (strstr(hoststr,"\\\\.\\")) { return -1; }
|
||||
if (strstr(hoststr, "\\\\.\\")) { return -1; }
|
||||
|
||||
// bracketed IPV6 with optional port
|
||||
int n = sscanf(hoststr, "[%255[^]]]:%5s", host, port);
|
||||
|
|
|
@ -1054,5 +1054,6 @@ int find_on_list(char **list, char *what)
|
|||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue