Fix compilation with debug on.
Fix segfault when TargetAddress is missing or mis-spelled in config file.
This commit is contained in:
parent
c06b9dd0c0
commit
7b78852f1d
@ -295,7 +295,7 @@ keyLookup(char *key)
|
|||||||
{
|
{
|
||||||
textkey_t *tk;
|
textkey_t *tk;
|
||||||
|
|
||||||
for(tk = keyMap; tk->name; tk++) {
|
for(tk = keyMap; tk->name && strcmp(tk->name, "end"); tk++) {
|
||||||
if(strcasecmp(key, tk->name) == 0)
|
if(strcasecmp(key, tk->name) == 0)
|
||||||
return tk;
|
return tk;
|
||||||
}
|
}
|
||||||
|
@ -359,8 +359,8 @@ doCAM(isess_t *sess)
|
|||||||
| for now will do this for each lun ...
|
| for now will do this for each lun ...
|
||||||
*/
|
*/
|
||||||
for(n = i = 0; i < sess->cam.target_nluns; i++) {
|
for(n = i = 0; i < sess->cam.target_nluns; i++) {
|
||||||
debug(2, "CAM path_id=%d target_id=%d target_lun=%d",
|
debug(2, "CAM path_id=%d target_id=%d",
|
||||||
sess->cam.path_id, sess->cam.target_id, sess->cam.target_lun[i]);
|
sess->cam.path_id, sess->cam.target_id);
|
||||||
|
|
||||||
sess->camdev = cam_open_btl(sess->cam.path_id, sess->cam.target_id,
|
sess->camdev = cam_open_btl(sess->cam.path_id, sess->cam.target_id,
|
||||||
i, O_RDWR, NULL);
|
i, O_RDWR, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user