Lines 98-110
OPENLDAP::Book::parse_result (LDAPMessage* message)
Link Here
|
98 |
if (!strcasecmp(bv.bv_val,attributes[i]) && bvals && bvals[0].bv_val ) { |
98 |
if (!strcasecmp(bv.bv_val,attributes[i]) && bvals && bvals[0].bv_val ) { |
99 |
call_addresses[attributes[i]] = |
99 |
call_addresses[attributes[i]] = |
100 |
/* FIXME: next line is annoying */ |
100 |
/* FIXME: next line is annoying */ |
101 |
std::string ("sip:") + |
101 |
std::string ("sip:") + |
102 |
std::string (bvals[0].bv_val, bvals[0].bv_len); |
102 |
std::string (bvals[0].bv_val, bvals[0].bv_len); |
103 |
} |
103 |
} |
104 |
} |
104 |
} |
105 |
} |
105 |
} |
106 |
if (bvals) ber_memfree(bvals); |
106 |
if (bvals) ber_memfree(bvals); |
107 |
} |
107 |
} |
108 |
|
108 |
|
109 |
ber_free (ber, 0); |
109 |
ber_free (ber, 0); |
110 |
|
110 |
|
Lines 306-333
OPENLDAP::Book::Book (Ekiga::ServiceCore &_core,
Link Here
|
306 |
} |
306 |
} |
307 |
if (hostname_node) { |
307 |
if (hostname_node) { |
308 |
|
308 |
|
309 |
xmlUnlinkNode (hostname_node); |
309 |
xmlUnlinkNode (hostname_node); |
310 |
xmlFreeNode (hostname_node); |
310 |
xmlFreeNode (hostname_node); |
311 |
} |
311 |
} |
312 |
if (port_node) { |
312 |
if (port_node) { |
313 |
|
313 |
|
314 |
xmlUnlinkNode (port_node); |
314 |
xmlUnlinkNode (port_node); |
315 |
xmlFreeNode (port_node); |
315 |
xmlFreeNode (port_node); |
316 |
} |
316 |
} |
317 |
if (base_node) { |
317 |
if (base_node) { |
318 |
|
318 |
|
319 |
xmlUnlinkNode (base_node); |
319 |
xmlUnlinkNode (base_node); |
320 |
xmlFreeNode (base_node); |
320 |
xmlFreeNode (base_node); |
321 |
} |
321 |
} |
322 |
if (scope_node) { |
322 |
if (scope_node) { |
323 |
|
323 |
|
324 |
xmlUnlinkNode (scope_node); |
324 |
xmlUnlinkNode (scope_node); |
325 |
xmlFreeNode (scope_node); |
325 |
xmlFreeNode (scope_node); |
326 |
} |
326 |
} |
327 |
if (call_attribute_node) { |
327 |
if (call_attribute_node) { |
328 |
|
328 |
|
329 |
xmlUnlinkNode (call_attribute_node); |
329 |
xmlUnlinkNode (call_attribute_node); |
330 |
xmlFreeNode (call_attribute_node); |
330 |
xmlFreeNode (call_attribute_node); |
331 |
} |
331 |
} |
332 |
trigger_saving.emit (); |
332 |
trigger_saving.emit (); |
333 |
} |
333 |
} |
Lines 351-364
OPENLDAP::Book::Book (Ekiga::ServiceCore &_core,
Link Here
|
351 |
bookinfo.name).c_str ()); |
351 |
bookinfo.name).c_str ()); |
352 |
|
352 |
|
353 |
uri_node = xmlNewChild (node, NULL, |
353 |
uri_node = xmlNewChild (node, NULL, |
354 |
BAD_CAST "uri", |
354 |
BAD_CAST "uri", |
355 |
BAD_CAST robust_xmlEscape (node->doc, |
355 |
BAD_CAST robust_xmlEscape (node->doc, |
356 |
bookinfo.uri).c_str ()); |
356 |
bookinfo.uri).c_str ()); |
357 |
|
357 |
|
358 |
authcID_node = xmlNewChild (node, NULL, |
358 |
authcID_node = xmlNewChild (node, NULL, |
359 |
BAD_CAST "authcID", |
359 |
BAD_CAST "authcID", |
360 |
BAD_CAST robust_xmlEscape (node->doc, |
360 |
BAD_CAST robust_xmlEscape (node->doc, |
361 |
bookinfo.authcID).c_str ()); |
361 |
bookinfo.authcID).c_str ()); |
362 |
|
362 |
|
363 |
password_node = xmlNewChild (node, NULL, |
363 |
password_node = xmlNewChild (node, NULL, |
364 |
BAD_CAST "password", |
364 |
BAD_CAST "password", |
Lines 471-652
OPENLDAP::Book::on_sasl_form_submitted (bool submitted,
Link Here
|
471 |
|
471 |
|
472 |
extern "C" { |
472 |
extern "C" { |
473 |
|
473 |
|
474 |
typedef struct interctx { |
474 |
typedef struct interctx { |
475 |
OPENLDAP::Book *book; |
475 |
OPENLDAP::Book *book; |
476 |
std::string authcID; |
476 |
std::string authcID; |
477 |
std::string password; |
477 |
std::string password; |
478 |
std::list<std::string> results; |
478 |
std::list<std::string> results; |
479 |
} interctx; |
479 |
} interctx; |
480 |
|
480 |
|
481 |
static int |
481 |
static int |
482 |
book_saslinter(LDAP *ld, unsigned flags __attribute__((unused)), |
482 |
book_saslinter(LDAP *ld, unsigned flags __attribute__((unused)), |
483 |
void *def, void *inter) |
483 |
void *def, void *inter) |
484 |
{ |
|
|
485 |
sasl_interact_t *in = (sasl_interact_t *)inter; |
486 |
interctx *ctx = (interctx *)def; |
487 |
struct berval p; |
488 |
int i, nprompts = 0; |
489 |
|
490 |
/* Fill in the prompts we have info for; count |
491 |
* how many we're missing. |
492 |
*/ |
493 |
for (;in->id != SASL_CB_LIST_END;in++) |
494 |
{ |
484 |
{ |
495 |
p.bv_val = NULL; |
485 |
sasl_interact_t *in = (sasl_interact_t *)inter; |
496 |
switch(in->id) |
486 |
interctx *ctx = (interctx *)def; |
497 |
{ |
487 |
struct berval p; |
498 |
case SASL_CB_GETREALM: |
488 |
int i, nprompts = 0; |
499 |
ldap_get_option(ld, LDAP_OPT_X_SASL_REALM, &p.bv_val); |
489 |
|
500 |
if (p.bv_val) p.bv_len = strlen(p.bv_val); |
490 |
/* Fill in the prompts we have info for; count |
501 |
break; |
491 |
* how many we're missing. |
502 |
case SASL_CB_AUTHNAME: |
492 |
*/ |
503 |
p.bv_len = ctx->authcID.length(); |
493 |
for (;in->id != SASL_CB_LIST_END;in++) |
504 |
if (p.bv_len) |
|
|
505 |
p.bv_val = (char *)ctx->authcID.c_str(); |
506 |
break; |
507 |
case SASL_CB_USER: |
508 |
/* If there was a default authcID, just ignore the authzID */ |
509 |
if (ctx->authcID.length()) { |
510 |
p.bv_val = (char *)""; |
511 |
p.bv_len = 0; |
512 |
} |
513 |
break; |
514 |
case SASL_CB_PASS: |
515 |
p.bv_len = ctx->password.length(); |
516 |
if (p.bv_len) |
517 |
p.bv_val = (char *)ctx->password.c_str(); |
518 |
break; |
519 |
default: |
520 |
break; |
521 |
} |
522 |
if (p.bv_val) |
523 |
{ |
524 |
in->result = p.bv_val; |
525 |
in->len = p.bv_len; |
526 |
} else |
527 |
{ |
528 |
nprompts++; |
529 |
in->result = NULL; |
530 |
} |
531 |
} |
532 |
|
533 |
/* If there are missing items, try to get them all in one dialog */ |
534 |
if (nprompts) { |
535 |
Ekiga::FormRequestSimple request(sigc::mem_fun (ctx->book, &OPENLDAP::Book::on_sasl_form_submitted)); |
536 |
Ekiga::FormBuilder result; |
537 |
std::string prompt; |
538 |
std::string ctxt = ""; |
539 |
char resbuf[32]; |
540 |
|
541 |
request.title (_("LDAP SASL Interaction")); |
542 |
|
543 |
for (i=0, in = (sasl_interact_t *)inter; |
544 |
in->id != SASL_CB_LIST_END;in++) |
545 |
{ |
546 |
bool noecho = false, challenge = false; |
547 |
|
548 |
if (in->result) continue; |
549 |
|
550 |
/* Give each dialog item a unique name */ |
551 |
sprintf(resbuf, "res%02x", i); |
552 |
i++; |
553 |
|
554 |
/* Check for prompts that need special handling */ |
555 |
switch(in->id) |
556 |
{ |
494 |
{ |
557 |
case SASL_CB_PASS: |
495 |
p.bv_val = NULL; |
558 |
noecho = true; |
496 |
switch(in->id) |
559 |
break; |
497 |
{ |
560 |
case SASL_CB_NOECHOPROMPT: |
498 |
case SASL_CB_GETREALM: |
561 |
noecho = true; |
499 |
ldap_get_option(ld, LDAP_OPT_X_SASL_REALM, &p.bv_val); |
562 |
challenge = true; |
500 |
if (p.bv_val) p.bv_len = strlen(p.bv_val); |
563 |
break; |
501 |
break; |
564 |
case SASL_CB_ECHOPROMPT: |
502 |
case SASL_CB_AUTHNAME: |
565 |
challenge = true; |
503 |
p.bv_len = ctx->authcID.length(); |
566 |
break; |
504 |
if (p.bv_len) |
567 |
default: |
505 |
p.bv_val = (char *)ctx->authcID.c_str(); |
568 |
break; |
506 |
break; |
|
|
507 |
case SASL_CB_USER: |
508 |
/* If there was a default authcID, just ignore the authzID */ |
509 |
if (ctx->authcID.length()) { |
510 |
p.bv_val = (char *)""; |
511 |
p.bv_len = 0; |
512 |
} |
513 |
break; |
514 |
case SASL_CB_PASS: |
515 |
p.bv_len = ctx->password.length(); |
516 |
if (p.bv_len) |
517 |
p.bv_val = (char *)ctx->password.c_str(); |
518 |
break; |
519 |
default: |
520 |
break; |
521 |
} |
522 |
if (p.bv_val) |
523 |
{ |
524 |
in->result = p.bv_val; |
525 |
in->len = p.bv_len; |
526 |
} else |
527 |
{ |
528 |
nprompts++; |
529 |
in->result = NULL; |
530 |
} |
569 |
} |
531 |
} |
570 |
|
532 |
|
571 |
/* accumulate any challenge strings */ |
533 |
/* If there are missing items, try to get them all in one dialog */ |
572 |
if (challenge && in->challenge) { |
534 |
if (nprompts) { |
573 |
|
535 |
Ekiga::FormRequestSimple request(sigc::mem_fun (ctx->book, &OPENLDAP::Book::on_sasl_form_submitted)); |
574 |
/* Translators, Howard explained : "Challenge" is a generic term |
536 |
Ekiga::FormBuilder result; |
575 |
* in authentication. It's a prompt from the authentication mechanism |
537 |
std::string prompt; |
576 |
* for some type of credential. Exactly what kind of challenge and |
538 |
std::string ctxt = ""; |
577 |
* what kind of credential depends on the specific authentication |
539 |
char resbuf[32]; |
578 |
* mechanism. Since SASL is a generic interface, and can dynamically |
540 |
|
579 |
* load arbitrary mechanisms, there's not much more specific you can |
541 |
request.title (_("LDAP SASL Interaction")); |
580 |
* say about it. You might google for "challenge response |
542 |
|
581 |
* authentication" if you'd like more background context. |
543 |
for (i=0, in = (sasl_interact_t *)inter; |
582 |
*/ |
544 |
in->id != SASL_CB_LIST_END;in++) |
583 |
ctxt += std::string (_("Challenge: ")) + |
545 |
{ |
584 |
std::string (in->challenge) +"\n"; |
546 |
bool noecho = false, challenge = false; |
585 |
} |
547 |
|
586 |
|
548 |
if (in->result) continue; |
587 |
/* use the provided prompt text, or our default? */ |
549 |
|
588 |
if (in->prompt) |
550 |
/* Give each dialog item a unique name */ |
589 |
prompt = std::string (in->prompt); |
551 |
sprintf(resbuf, "res%02x", i); |
590 |
else |
552 |
i++; |
591 |
prompt = std::string (_("Interact")); |
553 |
|
592 |
|
554 |
/* Check for prompts that need special handling */ |
593 |
/* private text or not? */ |
555 |
switch(in->id) |
594 |
if (noecho) { |
556 |
{ |
595 |
request.private_text (std::string (resbuf), prompt, ""); |
557 |
case SASL_CB_PASS: |
596 |
} else { |
558 |
noecho = true; |
597 |
std::string dflt; |
559 |
break; |
598 |
if (in->defresult) |
560 |
case SASL_CB_NOECHOPROMPT: |
599 |
dflt = std::string (in->defresult); |
561 |
noecho = true; |
600 |
else |
562 |
challenge = true; |
601 |
dflt = ""; |
563 |
break; |
602 |
request.text (std::string(resbuf), prompt, dflt); |
564 |
case SASL_CB_ECHOPROMPT: |
603 |
} |
565 |
challenge = true; |
604 |
} |
566 |
break; |
605 |
|
567 |
default: |
606 |
/* If we had any challenge text, set it now */ |
568 |
break; |
607 |
if (!ctxt.empty()) |
569 |
} |
608 |
request.instructions (ctxt); |
570 |
|
609 |
|
571 |
/* accumulate any challenge strings */ |
610 |
/* Save a pointer for storing the form result */ |
572 |
if (challenge && in->challenge) { |
611 |
ctx->book->saslform = &result; |
573 |
|
612 |
if (!ctx->book->questions.handle_request (&request)) { |
574 |
/* Translators, Howard explained : "Challenge" is a generic term |
613 |
return LDAP_LOCAL_ERROR; |
575 |
* in authentication. It's a prompt from the authentication mechanism |
614 |
} |
576 |
* for some type of credential. Exactly what kind of challenge and |
615 |
|
577 |
* what kind of credential depends on the specific authentication |
616 |
/* Extract answers from the result form */ |
578 |
* mechanism. Since SASL is a generic interface, and can dynamically |
617 |
for (i=0, in = (sasl_interact_t *)inter; |
579 |
* load arbitrary mechanisms, there's not much more specific you can |
618 |
in->id != SASL_CB_LIST_END;in++) |
580 |
* say about it. You might google for "challenge response |
619 |
{ |
581 |
* authentication" if you'd like more background context. |
620 |
bool noecho = false; |
582 |
*/ |
|
|
583 |
ctxt += std::string (_("Challenge: ")) + |
584 |
std::string (in->challenge) +"\n"; |
585 |
} |
586 |
|
587 |
/* use the provided prompt text, or our default? */ |
588 |
if (in->prompt) |
589 |
prompt = std::string (in->prompt); |
590 |
else |
591 |
prompt = std::string (_("Interact")); |
592 |
|
593 |
/* private text or not? */ |
594 |
if (noecho) { |
595 |
request.private_text (std::string (resbuf), prompt, ""); |
596 |
} else { |
597 |
std::string dflt; |
598 |
if (in->defresult) |
599 |
dflt = std::string (in->defresult); |
600 |
else |
601 |
dflt = ""; |
602 |
request.text (std::string(resbuf), prompt, dflt); |
603 |
} |
604 |
} |
621 |
|
605 |
|
622 |
if (in->result) continue; |
606 |
/* If we had any challenge text, set it now */ |
|
|
607 |
if (!ctxt.empty()) |
608 |
request.instructions (ctxt); |
623 |
|
609 |
|
624 |
sprintf(resbuf, "res%02x", i); |
610 |
/* Save a pointer for storing the form result */ |
625 |
i++; |
611 |
ctx->book->saslform = &result; |
626 |
switch(in->id) |
612 |
if (!ctx->book->questions.handle_request (&request)) { |
627 |
{ |
613 |
return LDAP_LOCAL_ERROR; |
628 |
case SASL_CB_PASS: |
|
|
629 |
case SASL_CB_NOECHOPROMPT: |
630 |
noecho = true; |
631 |
break; |
632 |
default: |
633 |
break; |
634 |
} |
614 |
} |
635 |
if (noecho) |
615 |
|
636 |
prompt = result.private_text (std::string (resbuf)); |
616 |
/* Extract answers from the result form */ |
637 |
else |
617 |
for (i=0, in = (sasl_interact_t *)inter; |
638 |
prompt = result.text (std::string (resbuf)); |
618 |
in->id != SASL_CB_LIST_END;in++) |
639 |
|
619 |
{ |
640 |
/* Save the answers so they don't disappear before our |
620 |
bool noecho = false; |
641 |
* caller can see them; return the saved copies. |
621 |
|
642 |
*/ |
622 |
if (in->result) continue; |
643 |
ctx->results.push_back (prompt); |
623 |
|
644 |
in->result = ctx->results.back().c_str(); |
624 |
sprintf(resbuf, "res%02x", i); |
645 |
in->len = ctx->results.back().length(); |
625 |
i++; |
|
|
626 |
switch(in->id) |
627 |
{ |
628 |
case SASL_CB_PASS: |
629 |
case SASL_CB_NOECHOPROMPT: |
630 |
noecho = true; |
631 |
break; |
632 |
default: |
633 |
break; |
634 |
} |
635 |
if (noecho) |
636 |
prompt = result.private_text (std::string (resbuf)); |
637 |
else |
638 |
prompt = result.text (std::string (resbuf)); |
639 |
|
640 |
/* Save the answers so they don't disappear before our |
641 |
* caller can see them; return the saved copies. |
642 |
*/ |
643 |
ctx->results.push_back (prompt); |
644 |
in->result = ctx->results.back().c_str(); |
645 |
in->len = ctx->results.back().length(); |
646 |
} |
646 |
} |
647 |
} |
|
|
648 |
return LDAP_SUCCESS; |
647 |
} |
649 |
} |
648 |
return LDAP_SUCCESS; |
|
|
649 |
} |
650 |
|
650 |
|
651 |
} /* extern "C" */ |
651 |
} /* extern "C" */ |
652 |
|
652 |
|
Lines 693-700
OPENLDAP::Book::refresh_start ()
Link Here
|
693 |
ctx.authcID = bookinfo.authcID; |
693 |
ctx.authcID = bookinfo.authcID; |
694 |
ctx.password = bookinfo.password; |
694 |
ctx.password = bookinfo.password; |
695 |
result = ldap_sasl_interactive_bind_s (ldap_context, NULL, |
695 |
result = ldap_sasl_interactive_bind_s (ldap_context, NULL, |
696 |
bookinfo.saslMech.c_str(), NULL, NULL, LDAP_SASL_QUIET, |
696 |
bookinfo.saslMech.c_str(), NULL, NULL, LDAP_SASL_QUIET, |
697 |
book_saslinter, &ctx); |
697 |
book_saslinter, &ctx); |
698 |
|
698 |
|
699 |
} else { |
699 |
} else { |
700 |
/* Simple Bind */ |
700 |
/* Simple Bind */ |
Lines 784-790
OPENLDAP::Book::refresh_bound ()
Link Here
|
784 |
} |
784 |
} |
785 |
(void) ldap_msgfree (msg_entry); |
785 |
(void) ldap_msgfree (msg_entry); |
786 |
|
786 |
|
787 |
sasl_bound: |
787 |
sasl_bound: |
788 |
if (!search_filter.empty ()) { |
788 |
if (!search_filter.empty ()) { |
789 |
if (search_filter[0] == '(' && |
789 |
if (search_filter[0] == '(' && |
790 |
search_filter[search_filter.length()-1] == ')') { |
790 |
search_filter[search_filter.length()-1] == ')') { |
Lines 806-812
sasl_bound:
Link Here
|
806 |
} |
806 |
} |
807 |
fstr = filter.c_str(); |
807 |
fstr = filter.c_str(); |
808 |
|
808 |
|
809 |
do_search: |
809 |
do_search: |
810 |
msgid = ldap_search_ext (ldap_context, |
810 |
msgid = ldap_search_ext (ldap_context, |
811 |
bookinfo.urld->lud_dn, |
811 |
bookinfo.urld->lud_dn, |
812 |
bookinfo.urld->lud_scope, |
812 |
bookinfo.urld->lud_scope, |
Lines 854-870
OPENLDAP::Book::refresh_result ()
Link Here
|
854 |
|
854 |
|
855 |
patience--; |
855 |
patience--; |
856 |
Ekiga::Runtime::run_in_main (sigc::mem_fun (this, &OPENLDAP::Book::refresh_result), |
856 |
Ekiga::Runtime::run_in_main (sigc::mem_fun (this, &OPENLDAP::Book::refresh_result), |
857 |
12); |
857 |
12); |
858 |
} else if (patience == 2) { |
858 |
} else if (patience == 2) { |
859 |
|
859 |
|
860 |
patience--; |
860 |
patience--; |
861 |
Ekiga::Runtime::run_in_main (sigc::mem_fun (this, &OPENLDAP::Book::refresh_result), |
861 |
Ekiga::Runtime::run_in_main (sigc::mem_fun (this, &OPENLDAP::Book::refresh_result), |
862 |
21); |
862 |
21); |
863 |
} else if (patience == 1) { |
863 |
} else if (patience == 1) { |
864 |
|
864 |
|
865 |
patience--; |
865 |
patience--; |
866 |
Ekiga::Runtime::run_in_main (sigc::mem_fun (this, &OPENLDAP::Book::refresh_result), |
866 |
Ekiga::Runtime::run_in_main (sigc::mem_fun (this, &OPENLDAP::Book::refresh_result), |
867 |
30); |
867 |
30); |
868 |
} else { // patience == 0 |
868 |
} else { // patience == 0 |
869 |
|
869 |
|
870 |
status = std::string (_("Could not search")); |
870 |
status = std::string (_("Could not search")); |
Lines 929-935
OPENLDAP::BookForm (Ekiga::FormRequestSimple &request,
Link Here
|
929 |
choices["sub"] = _("Subtree"); |
929 |
choices["sub"] = _("Subtree"); |
930 |
choices["onelevel"] = _("Single Level"); |
930 |
choices["onelevel"] = _("Single Level"); |
931 |
request.single_choice ("scope", _("_Search Scope"), |
931 |
request.single_choice ("scope", _("_Search Scope"), |
932 |
scopes[info.urld->lud_scope], choices); |
932 |
scopes[info.urld->lud_scope], choices); |
933 |
} |
933 |
} |
934 |
|
934 |
|
935 |
/* attrs[0] is the name attribute */ |
935 |
/* attrs[0] is the name attribute */ |
Lines 977-983
OPENLDAP::BookForm (Ekiga::FormRequestSimple &request,
Link Here
|
977 |
} |
977 |
} |
978 |
} |
978 |
} |
979 |
request.single_choice ("saslMech", _("SASL _Mechanism"), |
979 |
request.single_choice ("saslMech", _("SASL _Mechanism"), |
980 |
info.saslMech, mechs); |
980 |
info.saslMech, mechs); |
981 |
} |
981 |
} |
982 |
} |
982 |
} |
983 |
|
983 |
|
Lines 1099-1135
OPENLDAP::Book::on_edit_form_submitted (bool submitted,
Link Here
|
1099 |
if (!submitted) |
1099 |
if (!submitted) |
1100 |
return; |
1100 |
return; |
1101 |
|
1101 |
|
1102 |
try { |
1102 |
std::string errmsg; |
1103 |
std::string errmsg; |
1103 |
if (OPENLDAP::BookFormInfo (result, bookinfo, errmsg)) { |
1104 |
if (OPENLDAP::BookFormInfo (result, bookinfo, errmsg)) { |
1104 |
Ekiga::FormRequestSimple request(sigc::mem_fun (this, &OPENLDAP::Book::on_edit_form_submitted)); |
1105 |
Ekiga::FormRequestSimple request(sigc::mem_fun (this, &OPENLDAP::Book::on_edit_form_submitted)); |
|
|
1106 |
|
1105 |
|
1107 |
result.visit (request); |
1106 |
result.visit (request); |
1108 |
request.error (errmsg); |
1107 |
request.error (errmsg); |
1109 |
|
1108 |
|
1110 |
if (!questions.handle_request (&request)) { |
1109 |
if (!questions.handle_request (&request)) { |
1111 |
|
1110 |
|
1112 |
// FIXME: better error reporting |
1111 |
// FIXME: better error reporting |
1113 |
#ifdef __GNUC__ |
1112 |
#ifdef __GNUC__ |
1114 |
std::cout << "Unhandled form request in " |
1113 |
std::cout << "Unhandled form request in " |
1115 |
<< __PRETTY_FUNCTION__ << std::endl; |
1114 |
<< __PRETTY_FUNCTION__ << std::endl; |
1116 |
#endif |
1115 |
#endif |
1117 |
} |
|
|
1118 |
return; |
1119 |
} |
1116 |
} |
|
|
1117 |
return; |
1118 |
} |
1120 |
|
1119 |
|
1121 |
robust_xmlNodeSetContent (node, &name_node, "name", bookinfo.name); |
1120 |
robust_xmlNodeSetContent (node, &name_node, "name", bookinfo.name); |
1122 |
|
|
|
1123 |
robust_xmlNodeSetContent (node, &uri_node, "uri", bookinfo.uri); |
1124 |
|
1125 |
robust_xmlNodeSetContent (node, &authcID_node, "authcID", bookinfo.authcID); |
1126 |
|
1121 |
|
1127 |
robust_xmlNodeSetContent (node, &password_node, "password", bookinfo.password); |
1122 |
robust_xmlNodeSetContent (node, &uri_node, "uri", bookinfo.uri); |
1128 |
updated.emit (); |
|
|
1129 |
trigger_saving.emit (); |
1130 |
|
1123 |
|
1131 |
} catch (Ekiga::Form::not_found) { |
1124 |
robust_xmlNodeSetContent (node, &authcID_node, "authcID", bookinfo.authcID); |
1132 |
|
1125 |
|
1133 |
std::cerr << "Invalid result form" << std::endl; // FIXME: do better |
1126 |
robust_xmlNodeSetContent (node, &password_node, "password", bookinfo.password); |
1134 |
} |
1127 |
updated.emit (); |
|
|
1128 |
trigger_saving.emit (); |
1135 |
} |
1129 |
} |