Files @ d11fdaf3e279
Branch filter:

Location: libtransport.git/backends/twitter/Requests/DestroyFriendRequest.cpp

Sebastian Krzyszkowiak
systemd: wait for network-online.target and add WantedBy=multi-user.target

Thanks to that, "systemctl enable spectrum2" does what expected, that is
makes Spectrum2 start on boot. Also, network.target doesn't tell anything
meaningful - it's just that the network stack is available.
Adding network-online.target makes sure that the network interfaces are up
before starting Spectrum2.
#include "DestroyFriendRequest.h"
DEFINE_LOGGER(logger, "DestroyFriendRequest")

void DestroyFriendRequest::run()
{
	replyMsg = "";
	success = twitObj->friendshipDestroy(frnd, false);
	if(success) {
		twitObj->getLastWebResponse(replyMsg);

		LOG4CXX_INFO(logger, user << replyMsg);


	   	friendInfo = getUser(replyMsg);
		if(friendInfo.getScreenName() == "") LOG4CXX_INFO(logger, user << " - Was unable to fetch user info for " << frnd);
	}
}

void DestroyFriendRequest::finalize()
{
	Error error;
	if(!success) {
		std::string curlerror;
		twitObj->getLastCurlError(curlerror);
		error.setMessage(curlerror);
		LOG4CXX_ERROR(logger, user << " Curl error: " << curlerror);
		callBack(user, friendInfo, error);
	} else {
		error = getErrorMessage(replyMsg);
		if(error.getMessage().length()) LOG4CXX_ERROR(logger, user << " - " << error.getMessage());
		callBack(user, friendInfo, error);
	}
}