Added missing #endif in openPort function.
Added control in return value of CodebenderccAPI::runAvrdude function. If retval is not 0 and getFlashResult doesn't contain the word "avrdude" another value is returned in the main function.